<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="/WEB-INF/layouts/base.jsp"%>
<!DOCTYPE HTML>
<html>
  <head>
    <title>角色管理</title>
    <script src="${basePath}/static/admin/main/js/role-list.js"></script>
  </head>
  
  <body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight" >
       <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>角色列表</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                            <a class="close-link"><i class="fa fa-times"></i></a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row row-lg">
                            <div class="col-sm-12">
                                <div class="example-wrap">
                                    <div class="example">
                                        <div id="toolbar" class="btn-group m-t-sm">
                                            <button type="button" class="btn btn-default"  title="创建角色" onclick="member_show('创建角色','${basePath}/system/role/add',null,'900',null)">
                                                <i class="glyphicon glyphicon-plus"></i>
                                            </button>
                                            <button type="button" class="btn btn-default"  title="刷新列表" onclick="javascript:window.location.reload()">
                                                <i class="glyphicon glyphicon-refresh"></i>
                                            </button>                                           
                                        </div>
                                        <table id="table"
                                           data-toggle="table"
                                           data-height="500"
                                           data-search="true"
                                           data-show-toggle="true"
                                           data-show-export="true"
                                           data-show-pagination-switch="true"
                                           data-show-columns="true"
                                           data-striped="true"
                                           data-pagination="true"
                                           data-sort-name="stargazers_count"
                                           data-sort-order="desc"
                                           data-toolbar="#toolbar">
                                        <thead>
                                        <tr>
                                            <th data-halign="center" data-align="center">序号</th>
                                            <th data-halign="center" data-align="center">角色名</th>
                                            <th data-halign="center" data-align="center">简码</th>
                                            <th data-halign="center" data-align="center">描述</th>
                                            <th data-halign="center" data-align="center">操作</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <c:forEach items="${roleList }" var="role" varStatus="status">
                                        <tr>
                                            <td>${status.index }</td>
                                            <td>${role.roleName }</td>
                                            <td>${role.roleCode }</td>
                                            <td>${role.desc }</td>
                                            <td class="td-manage">
                                            <a class="edit m-l-sm text-warning" href="javascript:void(0)" onclick="member_show('编辑','${basePath}/system/role/update','${role.id}','900',null)" title="编辑">
                                            <i class="glyphicon glyphicon-edit"></i>
                                            </a>
                                            <a class="remove m-l-sm text-danger" href="javascript:void(0)" onclick="member_del(this, '${role.id}')" title="删除">
                                            <i class="glyphicon glyphicon-remove"></i>
                                            </a>
                                            </td>
                                        </tr>
                                        </c:forEach>
                                        </tbody>
                                    </table>
                                    </div>
                                </div>
                        	</div>
                    	</div>
                    </div>
                </div>
            </div>
    	</div>
    </div>
  </body>
</html>